wayland: Keep last scale factor on surfaces after it left all outputs
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 15 Nov 2016 14:07:39 +0000 (15:07 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 18 Nov 2016 18:24:31 +0000 (13:24 -0500)
This can be triggered on workspace switches, and on hidpi results in
the scale factor being reset to 1 while the window is not in the
current workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=774476

gdk/wayland/gdkwindow-wayland.c

index e7fdd479a3037e7743486169326cd33918d185ba..010add3949ab2fd7dbf44e525aea8ce3c003cc78 100644 (file)
@@ -1217,7 +1217,8 @@ surface_leave (void              *data,
 
   impl->display_server.outputs = g_slist_remove (impl->display_server.outputs, output);
 
-  window_update_scale (window);
+  if (impl->display_server.outputs)
+    window_update_scale (window);
 }
 
 static const struct wl_surface_listener surface_listener = {